﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AdvertisementList.aspx.cs"
    Inherits="Admin_AdvertisementList" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>广告管理</title>
    <link href="skin/css/main.css" rel="stylesheet" type="text/css" />
    <link href="skin/css/base.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <div class="trHeader">
        <asp:Button ID="btnAdd" runat="server" Text="添加" OnClick="btnAdd_Click" />
    </div>
    <div>
        <table cellpadding="1" cellspacing="1">
            <tr>
                <td>
                    广告语
                </td>
                <td>
                    广告描述
                </td>
                <td>
                    图片路径
                </td>
                <td>
                    是否图片广告
                </td>
                <td>
                    跳转Url
                </td>
                <td>
                    序号
                </td>
                <td>
                    操作
                </td>
            </tr>
            <asp:Repeater runat="server" ID="rptList" OnItemCommand="rptList_ItemCommand">
                <ItemTemplate>
                    <tr>
                        <td>
                            <%#Eval("AdName")%>
                        </td>
                        <td>
                            <%#Eval("AdDesc")%>
                        </td>
                        <td>
                            <img height="100px" width="100px" src='<%#Eval("PicSrc")%>' />
                        </td>
                        <td>
                            <%#Eval("IsPic")%>
                        </td>
                        <td>
                            <%#Eval("TargetUrl")%>
                        </td>
                        <td>
                            <%#Eval("OrderId")%>
                        </td>
                        <td>
                            <asp:Button runat="server" ID="btnDel" CausesValidation="false" Text="删除" CommandArgument='<%#Eval("Id")%>'
                                CommandName="Del" />
                            <asp:Button runat="server" ID="btnUpdate" Text="编辑" CausesValidation="false" CommandArgument='<%#Eval("Id")%>'
                                CommandName="Update" />
                        </td>
                    </tr>
                </ItemTemplate>
            </asp:Repeater>
        </table>
    </div>
    <br />
    <webdiyer:AspNetPager ID="AspNetPager1" runat="server">
    </webdiyer:AspNetPager>
    <table cellpadding="1" cellspacing="1">
        <tr>
            <td>
                广告语：
            </td>
            <td>
                <asp:TextBox ID="txtAdvertisementName" runat="server" Width="450px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                描述：
            </td>
            <td>
                <asp:TextBox runat="server" ID="txtAdDesc" Width="450px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                图片路径：
            </td>
            <td>
                <asp:FileUpload ID="fup" runat="server" />
                <asp:Label ID="lblPicSrc" runat="server"></asp:Label>
            </td>
        </tr>
        <tr>
            <td>
                是否图片：
            </td>
            <td>
                <asp:DropDownList ID="drpIsPic" runat="server">
                    <asp:ListItem Value="0">否</asp:ListItem>
                    <asp:ListItem Value="1">是</asp:ListItem>
                </asp:DropDownList>
                <asp:HiddenField runat="server" ID="hid" />
            </td>
        </tr>
        <tr>
            <td>
                跳转Url：
            </td>
            <td>
                <asp:TextBox runat="server" ID="txtTargetUrl"></asp:TextBox>
                
            </td>
        </tr>
        <tr>
            <td>
                排序值：
            </td>
            <td>
                <asp:TextBox ID="txtOrderId" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td align="center" colspan="2">
                <asp:Button ID="btnSave" runat="server" Text="保存" OnClick="btnSave_Click" Width="68px" />
                &nbsp;
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
